package com.nova.edc.service.system;

import java.util.List;

import com.nova.edc.model.system.AreaPoint;
import com.nova.edc.model.system.CustomerArea;
import com.nova.edc.model.util.ExcelArea;
import com.nova.frame.dao.pager.Page;
import com.nova.frame.dao.pager.PageList;

/**
 * @param
 * @author <a href="mailto:huzhanjun@novacloud.com">huzj</a>
 * @version : 1.0
 * @date 2015-12-21 14:33
 */
public interface CustomerAreaService {
    //添加
    CustomerArea insert(CustomerArea customerArea);

    void insertByExcel(List<ExcelArea> excelAreaList);

    CustomerArea checkInsert(CustomerArea customerArea);

    PageList<CustomerArea> findPageCustomerArea(CustomerArea customerArea,
                                                Page page, String sidx, String sord);

    // 系统管理分页查看区域，同时需要查看区域的节点数、功率总数
    PageList<CustomerArea> findPageCustomerAreaDetail(CustomerArea customerArea, Page page, String sidx, String sord);

    CustomerArea findById(int id);

    int update(CustomerArea customerArea);

    int delete(int id);

    int deleteByCustomerArea(CustomerArea customerArea);

    List<CustomerArea> findCustomerArea(CustomerArea customerArea);

    // 根据日期区间封装该区域的耗电量
    void wrapEnergy(CustomerArea customerArea, String startDate, String endDate);

    // 根据日期区间更新所有的区域总耗电量
    void wrapEnergy(List<CustomerArea> customerAreas, String startDate, String endDate);

    void wrapGather(List<CustomerArea> customerAreas, String startDate, String endDate);

    void wrapGather(CustomerArea customerArea, String startDate, String endDate);

    //根据公司及区域获得
    CustomerArea getByarea(String areaName, Integer customerinfoId);

    boolean existCustomerArea(CustomerArea customerArea);

    List<CustomerArea> findByCustomereInfoIdAPI(Integer id);

}
